<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/view/include/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>个人任务</title>
</head>
<body>
	<!-- BEGIN CONTENT BODY -->
		<div class="page-content" style="height: 700px;">
						<div class="profile-content">
						<div class="row">
							<div class="col-md-12">
								<div class="portlet light">
									<div class="portlet-title tabbable-line">
										<div class="caption caption-md">
											<i class="icon-globe theme-font hide"></i>
											<span class="caption-subject font-blue-madison bold uppercase">流程管理</span>
										</div>
										<ul class="nav nav-tabs">
											<li class="active">
												<a href="#tab_1_1" data-toggle="tab" aria-expanded="true">所有流程</a>
											</li>
											<li >
												<a href="#tab_1_2" data-toggle="tab" aria-expanded="false">运行中的流程</a>
											</li>
											<li class="">
												<a href="#tab_1_3" data-toggle="tab" aria-expanded="false">上传流程定义文件</a>
											</li>
									 
										</ul>
									</div>
									<div class="portlet-body">
										<div class="tab-content">
											<!-- PERSONAL INFO TAB -->
											<div class="tab-pane active" id="tab_1_1" >
												 <!-- BEGIN EXAMPLE TABLE PORTLET-->
						<div class="portlet box green">
							<div class="portlet-title">
								<div class="caption">
									<i class="fa fa-cogs"></i>流程列表
								</div>
								<div class="tools">
				 
								</div>
							</div>

							<div class="portlet-body">
								<div class="table-toolbar">
									<div class="row">
										<div class="col-md-6">
											<div class="btn-group"></div>
										</div>
										<div class="col-md-6"></div>
									</div>
								</div>
								<table class="table table-striped table-hover table-bordered"
									id="sample_editable_1">
									<thead>
										<tr>
				<th>流程ID</th>
				<th>流程名称</th>
				<th>流程版本</th>
				<th>流程XML</th>
				<th>流程图片</th>
				<th>操作</th>
			</tr>
									</thead>
									<tbody>

										<c:forEach items="${processlList}" var="process">
				<tr>
					<td>${process.id}</td>
					<td>${process.name}</td>
					<td><b title='流程版本号'>V: ${process.version}</b></td>
					<td><a target="_blank" href="${ctx}/act/process/resource/read?procDefId=${process.id}&resType=xml">${process.resourceName}</a></td>
					<td><a target="_blank" href="${ctx}/act/process/resource/read?procDefId=${process.id}&resType=image">${process.diagramResourceName}</a></td>
					<td>
						<c:if test="${process.suspended}">
							<a href="${ctx}/act/process/update/active?procDefId=${process.id}" onclick="return confirmx('确认要激活吗？', this.href)">激活</a>
						</c:if>
						<c:if test="${!process.suspended}">
						 <a href="${ctx}/act/process/update/suspend?procDefId=${process.id}" onclick="return confirmx('确认挂起除吗？', this.href)">挂起</a>
						</c:if>
						<a href='${ctx}/act/process/delete?deploymentId=${process.deploymentId}' onclick="return confirmx('确认要删除该流程吗？', this.href)">删除</a>
                        <a href='${ctx}/act/process/convert/toModel?procDefId=${process.id}' onclick="return confirmx('确认要转换为模型吗？', this.href)">转换为模型</a>
					<a href='${ctx}/act/process/start?procInsId=${process.id}' onclick="return confirmx('确认要启动该流程吗？', this.href)">启动</a>
                        <a href='${ctx}/act/confNode/list/${process.id}' >配置流程</a>
					</td>
				</tr>
			</c:forEach>
									</tbody>
								</table>
							</div>
						</div>
						<!-- END EXAMPLE TABLE PORTLET-->
											</div>
											<!-- END PERSONAL INFO TAB -->
											<!-- CHANGE AVATAR TAB -->
											<div class="tab-pane " id="tab_1_3">
												<p>
												</p>
												<form action="${ctx}/act/process/uploadProcessFile" enctype="multipart/form-data"  name="form1" id="form1" method="post" role="form">
													<div class="form-group">
														<div class="fileinput fileinput-new" data-provides="fileinput">
															<div class="fileinput-new thumbnail" style="width: 200px; height: 150px;">
																<img src="http://www.placehold.it/200x150/EFEFEF/AAAAAA&amp;text=no+image" alt="">
															</div>
															流程分类：
															<div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 200px; max-height: 150px;">
															</div>
															<div>
																<span class="btn default btn-file">
																<span class="fileinput-new">
																 </span>
																 
																<input type="file" name="file">
																</span>
																<a href="javascript:;" class="btn default fileinput-exists" data-dismiss="fileinput">
																移除 </a>
															</div>
														</div>
														<div class="clearfix margin-top-10">
															<span class="label label-danger">注意 </span>
															<span>流程文件一般为bpmn格式,或者zip格式</span>
														</div>
													</div>
													<div class="margin-top-10">
														<a href="javascript:document.form1.submit();" class="btn green-haze">
														Submit </a>
														<a href="javascript:;" class="btn default">
														Cancel </a>
													</div>
												</form>
											</div>
											<!-- END CHANGE AVATAR TAB -->
											<!-- CHANGE PASSWORD TAB -->
											<div class="tab-pane" id="tab_1_2">
										 <!-- BEGIN EXAMPLE TABLE PORTLET-->
						<div class="portlet box green">
							<div class="portlet-title">
								<div class="caption">
									<i class="fa fa-cogs"></i>流程列表
								</div>
								<div class="tools">
						 
								</div>
							</div>

							<div class="portlet-body">
								<div class="table-toolbar">
									<div class="row">
										<div class="col-md-6">
											<div class="btn-group"></div>
										</div>
										<div class="col-md-6"></div>
									</div>
								</div>
								<table class="table table-striped table-hover table-bordered"
									id="sample_editable_1">
									<thead>
										<tr>
				<th>流程ID</th>
				<th>流程名称</th>
				<th>流程版本</th>
				<th>流程XML</th>
				<th>流程图片</th>
				<th>操作</th>
			</tr>
									</thead>
									<tbody>

										<c:forEach items="${processlList}" var="process">
				<tr>
					<td>${process.id}</td>
					<td>${process.name}</td>
					<td><b title='流程版本号'>V: ${process.version}</b></td>
					<td><a target="_blank" href="${ctx}/act/process/resource/read?procDefId=${process.id}&resType=xml">${process.resourceName}</a></td>
					<td><a target="_blank" href="${ctx}/act/process/resource/read?procDefId=${process.id}&resType=image">${process.diagramResourceName}</a></td>
					<td>
						<c:if test="${process.suspended}">
							<a href="${ctx}/act/process/update/active?procDefId=${process.id}" onclick="return confirmx('确认要激活吗？', this.href)">激活</a>
						</c:if>
						<c:if test="${!process.suspended}">
						 <a href="${ctx}/act/process/update/suspend?procDefId=${process.id}" onclick="return confirmx('确认挂起除吗？', this.href)">挂起</a>
						</c:if>
						<a href='${ctx}/act/process/delete?deploymentId=${process.deploymentId}' onclick="return confirmx('确认要删除该流程吗？', this.href)">删除</a>
                        <a href='${ctx}/act/process/convert/toModel?procDefId=${process.id}' onclick="return confirmx('确认要转换为模型吗？', this.href)">转换为模型</a>
					<a href='${ctx}/act/process/start?procInsId=${process.id}' onclick="return confirmx('确认要启动该流程吗？', this.href)">启动</a>
					<a href='${ctx}act/confNode/list/procInsId=${process.id}' >配置流程</a>
					</td>
				</tr>
			</c:forEach>
									</tbody>
								</table>
							</div>
						</div>
						<!-- END EXAMPLE TABLE PORTLET-->
											</div>
											 
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
</div>
	<!-- END CONTENT BODY -->
		<!-- BEGIN CORE PLUGINS -->
		<!--[if lt IE 9]>
<script src="../../assets/global/plugins/respond.min.js"></script>
<script src="../../assets/global/plugins/excanvas.min.js"></script> 
<![endif]-->
		<script src="${ctxStatic}/assets/global/plugins/jquery.min.js"
			type="text/javascript"></script>
		<script src="${ctxStatic}/assets/global/plugins/jquery-migrate.min.js"
			type="text/javascript"></script>
		<!-- IMPORTANT! Load jquery-ui.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->
		<script
			src="${ctxStatic}/assets/global/plugins/jquery-ui/jquery-ui.min.js"
			type="text/javascript"></script>
		<script
			src="${ctxStatic}/assets/global/plugins/bootstrap/js/bootstrap.min.js"
			type="text/javascript"></script>
		<script
			src="${ctxStatic}/assets/global/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js"
			type="text/javascript"></script>
		<script
			src="${ctxStatic}/assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js"
			type="text/javascript"></script>
		<script src="${ctxStatic}/assets/global/plugins/jquery.blockui.min.js"
			type="text/javascript"></script>
		<script src="${ctxStatic}/assets/global/plugins/jquery.cokie.min.js"
			type="text/javascript"></script>
		<script
			src="${ctxStatic}/assets/global/plugins/uniform/jquery.uniform.min.js"
			type="text/javascript"></script>
		<script
			src="${ctxStatic}/assets/global/plugins/bootstrap-switch/js/bootstrap-switch.min.js"
			type="text/javascript"></script>
		<script src="${ctxStatic}/assets/global/scripts/datatable.js"
			type="text/javascript"></script>
		<script
			src="${ctxStatic}/assets/global/plugins/datatables/datatables.min.js"
			type="text/javascript"></script>
		<script
			src="${ctxStatic}/assets/global/plugins/datatables/plugins/bootstrap/datatables.bootstrap.js"
			type="text/javascript"></script>
	 
		<!-- END CORE PLUGINS -->
		<!-- BEGIN PAGE LEVEL PLUGINS -->
		<script
			src="${ctxStatic}/assets/global/plugins/bootstrap-fileinput/bootstrap-fileinput.js"
			type="text/javascript"></script>
		<!-- END PAGE LEVEL PLUGINS -->
    </body>
</html>